//
//  TDHomeShowCarHeadView.m
//  TBRentClient
//
//  Created by tonbright on 2018/6/4.
//  Copyright © 2018年 tonbright. All rights reserved.
//

#import "TDHomeShowCarHeadView.h"
#import "SDCycleScrollView.h"
@interface TDHomeShowCarHeadView ()<SDCycleScrollViewDelegate>

@property (weak, nonatomic) IBOutlet UIView *view_content;
@property (nonatomic, strong) SDCycleScrollView *cycleScrollView;

@end
@implementation TDHomeShowCarHeadView


+ (instancetype)homeShowCarHeadView {
    return [[NSBundle mainBundle] loadNibNamed:@"TDHomeShowCarHeadView" owner:nil options:nil].lastObject;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    SDCycleScrollView *cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, Width, AdaptH(150)) delegate:self placeholderImage:[UIImage imageNamed:@"home_banner_default"]];
    cycleScrollView.autoScrollTimeInterval = 5;
    self.cycleScrollView = cycleScrollView;
    [_view_content insertSubview:cycleScrollView atIndex:0];
    NSArray *imageArr = @[@"https://modao.cc/uploads3/images/1962/19624204/raw_1525233550.png",
                          @"https://modao.cc/uploads3/images/1962/19624204/raw_1525233536.png",
                          @"https://modao.cc/uploads3/images/1962/19624204/raw_1525233487.png"];
    //    /1962/19624204/raw_1525233550.png
    //    /1962/19624204/raw_1525233536.png
    //    /1962/19624204/raw_1525233487.png
    self.cycleScrollView.imageURLStringsGroup = imageArr;
}

@end
